package com.hoshiicloud.common.feign;

import com.hoshiicloud.common.feign.fallback.BaseHystrixIdGeneratorFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Set;

/**
 * Id生成微服务FeignClient
 *
 * @author : ygd
 * @date : 2019/5/6
 **/
@FeignClient(name = "hoshiicloud-id-generator", fallback = BaseHystrixIdGeneratorFeignFallback.class)
public interface BaseIdGeneratorService {

    /**
     * 获取ID主键
     *
     * @return String
     */
    @GetMapping("/getuuId")
    String queryGeneratorId();


    /**
     * 获取uuid
     *
     * @param count count
     * @return Set
     */
    @RequestMapping(value = "/getuuIdSet")
    Set<String> queryGeneratorIds(@RequestParam("count") Integer count);


}
